package com.haixiaoke.saas.repository.service;

import com.haixiaoke.saas.repository.pojo.OrderOperatingRecord;

import java.util.List;

/**
 * 订单记录Service接口
 *
 * @author haixiaoke
 * @date 2023-04-12
 */
public interface IOrderOperatingRecordService {
    /**
     * 查询订单记录
     *
     * @param orderRecordId 订单记录主键
     * @return 订单记录
     */
    public OrderOperatingRecord selectOrderOperatingRecordByOrderRecordId(Long orderRecordId);

    /**
     * 查询订单记录列表
     *
     * @param orderOperatingRecord 订单记录
     * @return 订单记录集合
     */
    List<OrderOperatingRecord> selectOrderOperatingRecordList(OrderOperatingRecord orderOperatingRecord);

    /**
     * 新增订单记录
     *
     * @param orderOperatingRecord 订单记录
     * @return 结果
     */
    public int insertOrderOperatingRecord(OrderOperatingRecord orderOperatingRecord);

    /**
     * 修改订单记录
     *
     * @param orderOperatingRecord 订单记录
     * @return 结果
     */
    int updateOrderOperatingRecord(OrderOperatingRecord orderOperatingRecord);

    /**
     * 批量删除订单记录
     *
     * @param orderRecordIds 需要删除的订单记录主键集合
     * @return 结果
     */
    int deleteOrderOperatingRecordByOrderRecordIds(Long[] orderRecordIds);

    /**
     * 删除订单记录信息
     *
     * @param orderRecordId 订单记录主键
     * @return 结果
     */
    int deleteOrderOperatingRecordByOrderRecordId(Long orderRecordId);

    /**
     * 根据订单id查询订单异常记录
     * @param orderId   订单id
     * @return
     */
    List<OrderOperatingRecord> getRecordByOrderId(Long orderId);

    /**
     * 查询订单取消的类型
     * @param orderId
     * @param orderState
     * @param orderStateUnPayment
     * @return
     */
    OrderOperatingRecord selectOperatingOrderCancel(String orderId, Integer orderState, Integer orderStateUnPayment);

    void deleteOrderOperatingRecordByOrderId(String orderId);

    OrderOperatingRecord selectOrderOperatingRecordByOrderId(String orderId);

    OrderOperatingRecord selectOrderOperatingRecordByOrderIdAndOperatingType(String orderId, Integer operatingType);
}
